#views-user-action.main.container.views(hidden='hidden')
  .row
    .col-xs-6
      img#user-action-image(style='height: 350px; margin: auto; display: block;', src='../screens/Screen6.jpg')
    .col-xs-6
      h4#user-action-title(style='font-weight: bold;')
      p#user-action-description
      button#user-action-button.btn.btn-primary(hidden="false", type='button', style='width: 100%;') Continue
  script.
    ipcRenderer.on("user:action", (event, action) => {
      views.show("user-action");
      $("#user-action-title").text(action.title)
      $("#user-action-description").text(action.description)

      if (action.image) $("#user-action-image").attr("src", "../img/" + action.image + ".jpg");
      else $("#user-action-image").attr("src", "../screens/Screen6.jpg");

      if (action.button) {
        $("#user-action-button").one("click", () => {
          event.sender.send("action:completed");
        });
        $("#user-action-button").show();
      } else {
        $("#user-action-button").hide();
      }
    });